from django.db import models


class User(models.Model):
    """
    用户表
    """
    user_name = models.CharField(max_length=32)
    password = models.CharField(max_length=32)
    user_number = models.CharField(max_length=32)


class UserInfo(models.Model):
    """
    用户详情表
    """
    nickname = models.CharField(max_length=32)
    age = models.IntegerField()
    sex = models.CharField(max_length=32)
    photo = models.ImageField(upload_to= 'image')
    education = models.CharField(max_length=32)
    Class = models.CharField(max_length=32)
    phone = models.CharField(max_length=32)
    email = models.EmailField()
    address = models.TextField()
    user_id = models.OneToOneField(to=User,on_delete=models.CASCADE)


# class Questions(models.Model):

# Create your models here.
